package com.zhang.spark_2.com.zhang.core.wc


import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

import scala.collection.mutable


/**
 * @title:
 * @author: zhang
 * @date: 2022/2/17 09:47 
 */
object WC_foldLeft {

  def main(args: Array[String]): Unit = {
    // TODO 获取环境
    val conf = new SparkConf().setMaster("local").setAppName("WordCount")
    val sc = new SparkContext(conf);

    val rdd = sc.makeRDD(
      List(("a", 1), ("b", 2), ("a", 1), ("b", 2), ("a", 1), ("b", 2)), 2
    )

    sc.stop()
  }

}
